Skip to content

Conversation

@abdelrahman-badary
Copy link

@abdelrahman-badary abdelrahman-badary commented Apr 8, 2017

This pull request solves this issue, the pull request has the following changes:

  • Added a new "Change position" button the the main view, when clicking the button an alert is shown with 2 textFields start and end time.

  • Added a new "setVideoBoundsToStartTime:endTime" method to the ICGVideoTrimmerView class, this method takes 2 parameters, start and end time, by calling this method the user can change the trimming of the video manually without dragging the thumb views; This method validates the inputs and if the validation fails the method returns immediately and if not the method calculates the new positions based on the start and end time and then notifies the delegate.

-Added the new metod to enable the users to manually control the positions of the trimming.
-Added 2 new private methods getMiddleXPointForLeftOverlayViewWithTime and getMiddleXPointForRightOverlayViewWithTime the 2 methods calculate the positions of the left and right thumb views given a start and end time respectively.

-Implemented the setVideoBounds method the method validates the inputs (start and end time) then the method uses the 2 new private methods  getMiddleXPointForLeftOverlayViewWithTime and getMiddleXPointForRightOverlayViewWithTime to calculate the new position of the thumb views then then the method notifies the delegate of the changes, in case the method fails to validate the input it immediately returns without noitifing the delegate.
-The action of the "Change position" shows a UIAlertController view with 2 textFields start and end time then passes the inputs to the setVideoBounds method.
-Changed the keyboard of the 2 textfields on the alert to be UIKeyboardTypeDecimalPad.

-Added a check on the input string to check if the input string in empty and if so a default value is set.
@abdelrahman-badary
Copy link
Author

@itsmeichigo hey are you going to look at this PR?, it has been more than 4 months now

@itsmeichigo
Copy link
Owner

Hi, sorry I have been caught up with other stuff so I sort of forgot about this. Will review it as soon as I can.

Thanks

@itsmeichigo
Copy link
Owner

Hi, I test with this video and it doesn't seem right to me. There are a lot of issues:

  • When I open the video, trimmer starts with 0 and the view limit to 15s. If I select range 20-30, this is what I get. The range is incorrect.
  • When I try to drag the left thumb back to the left, this is what I get. The right thumb disappears :[
    There could be many other issues, maybe you'd want to look at the changes again.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants